<?php
Auth::routes();

Route::options('{path?}/{path1?}/{path2?}', function () {
    return response('', 200);
});

Route::get('/', function () {
    return 'OK 商城首页';
});

Route::post('/upload', 'Upload@upload');                            //上传图片
Route::resource('/admin', 'Admin');                                 //管理员
Route::resource('/customer', 'Customer');                           //用户
Route::resource('/goods', 'Goods');                                 //商品
Route::resource('/order', 'Order');                                 //订单

//购物车
Route::get('/shop-car', 'Customer@shopCar');                        //获取购物车商品
Route::post('/shop-car', 'Customer@shop');                          //结算购物车商品
Route::post('/shop-car/{id}/goods', 'Goods@shopCar');               //添加购物车商品
Route::post('/shop-car/{id}/update', 'ShopCar@update');             //编辑购物车商品
Route::delete('/shop-car/{id}', 'ShopCar@destroy');                 //删除购物车商品

//订单
Route::get('/customer-order', 'Customer@order');                    //查看我的订单

Route::get('/home', 'HomeController@index');
